package com.zws.cucumber.optimization.backends;

import com.zws.cucumber.optimization.ZwsOptimizations;
import io.cucumber.core.backend.Backend;
import io.cucumber.core.backend.Glue;
import io.cucumber.core.backend.Snippet;
import io.cucumber.core.runner.CachingGlueHelper;

import java.net.URI;
import java.util.List;

public class ZwsStepInitJustOneTimeBackend implements Backend {
    @Override
    public void loadGlue(Glue glue, List<URI> gluePaths) {
        if (ZwsOptimizations.isStepInitJustOneTimeEnabled()) {
            CachingGlueHelper.modify(glue);
        }
    }

    @Override
    public void buildWorld() {

    }

    @Override
    public void disposeWorld() {

    }

    @Override
    public Snippet getSnippet() {
        return null;
    }
}
